package org.example.service.impl;

import org.example.domin.School;
import org.example.service.SchoolService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service("SchoolService")
public class SchoolServiceImpl implements SchoolService {
    @Override
    public School get() {
        School school = new School();
        school.setAddress("上海市徐汇区漕河泾开发区");
        school.setName("上海交通大学");

        System.out.println("执行了：获取学校信息的方法");
        System.out.println("获取学校：" + school.toString());
        return school;
    }

    @Override
    public void add(School school) {
        System.out.println("执行了：新增学校的方法");
        System.out.println("新增学校：" + school.toString());
    }
}
